const imgSrc = "./images/color.png";
var g_canvas, g_context;

function loadImage()
{
    var image = new Image();
    g_context.translate(300, 600);
    g_context.scale(1, -1);
    g_context.rotate(0.7854);
    g_context.shadowBlur = 50;
    g_context.shadowColor = "#d25e2c";
    image.src = imgSrc;
    image.onload = function() 
    {
        g_context.drawImage(image, 0, 0);
    }
}

function onloadHandler()
{
    g_canvas = document.getElementById('canvas');
    g_context = g_canvas.getContext('2d');
    loadImage();
}    

window.onload = onloadHandler;